<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2019/1/10
 * Time: 15:37
 */

namespace api\storage\common;


use api\storage\exception\TypeNotFoundException;
use api\storage\service\input\BlackInputService;
use api\storage\service\input\WhiteInputService;
use think\Exception;

class InputFactory
{

    public static function getInputService($type) {
        switch ($type) {
            case 0:
                return new BlackInputService();
                break;
            case 1:
                return new WhiteInputService();
                break;
            default:
                throw new TypeNotFoundException();
        }
    }
}